package org.qydjk.common.pojo.product;

import javax.persistence.*;
import java.util.Date;

/**
 * 产品单项实体
 * Created by Edward_yang on 2017/12/11 0011.
 * Anthor: Lanan
 */
@Entity
@Table(name = "qy_product_single_project", schema = "qydjk", catalog = "")
public class ProductSingleProject {
    private Integer id;
    private Integer productId;
    private Integer singleProjectCategoryId;
    private Integer singleProjectId;
    private Date createTime;
    private Date updateTime;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "product_id")
    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    @Basic
    @Column(name = "single_project_id")
    public Integer getSingleProjectId() {
        return singleProjectId;
    }

    public void setSingleProjectId(Integer singleProjectId) {
        this.singleProjectId = singleProjectId;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ProductSingleProject that = (ProductSingleProject) o;

        if (id != that.id) return false;
        if (productId != null ? !productId.equals(that.productId) : that.productId != null) return false;
        if (singleProjectId != null ? !singleProjectId.equals(that.singleProjectId) : that.singleProjectId != null)
            return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (productId != null ? productId.hashCode() : 0);
        result = 31 * result + (singleProjectId != null ? singleProjectId.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
    @Basic
    @Column(name = "single_project_category_id")
    public Integer getSingleProjectCategoryId() {
        return singleProjectCategoryId;
    }
    public void setSingleProjectCategoryId(Integer singleProjectCategoryId) {
        this.singleProjectCategoryId = singleProjectCategoryId;
    }
}
